<%@taglib uri="/struts-tags" prefix="s"%>
<html>
<head>
<link rel="stylesheet" href="basestyle.css">
<title>My page</title>
</head>
<body>
	<%@ page import="com.iiitb.model.User_Login" %>
	<% System.out.println("in menu jsp " +((User_Login)session.getAttribute("user")).getUsername());%>

	<div id="menustyle">
		<b>Welcome <%= ((User_Login)session.getAttribute("user")).getUsername()%>!</b>
		<br></br>
		<b>Role(<%= ((User_Login)session.getAttribute("user")).getRole()%>)!</b>
		<ul>
			<%if(((User_Login)session.getAttribute("user")).getRole().equals("Client") 
			){ %>
			<li>Projects
				<ul>
				<li><a href="<s:url action="viewProject"/>">View Projects Owned</a></li>
				<li><a href="<s:url action="viewProjectStatus"/>">View Project Progress</a></li>
				</ul>
			</li>
			<% } %>
			
			<%if(((User_Login)session.getAttribute("user")).getRole().equals("Manager") 
			){ %>
			<li>Project Manager
				<ul>
				<li>Approve Timesheets
				<ul>
					<li><a href="<s:url action="approveTime"/>">Approve timesheets</a></li>
				</ul>
				</li>
				<li>Add / Remove Team Members
				<ul>
					<li><a href="<s:url action="addMember"/>">Allocate Employee on Project</a></li>
					<li><a href="<s:url action="removeMember"/>">Deallocate Employee from Project</a></li>
				</ul>
				</li>
				<li>Project Status
				<ul>
					<li><a href="<s:url action="setProjectStatus"/>">Update Project Status</a></li>
				</ul>
				</li>
				</ul>
			</li>
			<% } %>
	
			<%if(((User_Login)session.getAttribute("user")).getRole().equals("Team Member") 
			){ %>
	
			<li>Timesheets
				<ul>
				<li><a href="<s:url action="saveTime"/>">Fill timesheet</a></li>
				<li><a href="<s:url action="editTime"/>">Edit timesheet</a></li>
				<li><a href="<s:url action="viewTime"/>">View timesheet</a></li>
				<li><a href="<s:url action="submitTime"/>">Submit timesheet for Approval</a></li>
				</ul>
			</li>
			<% } %>

			<%if(((User_Login)session.getAttribute("user")).getRole().equals("Admin")){ %>
			<li>Administrator
				<ul>
				<li>Create/View User
				<ul>
					<li><a href="<s:url action="loadCreateEmployee"/>">Create Employee</a></li>
					<li><a href="<s:url action="showEmployee"/>">View Employees</a></li>
				</ul>
				</li>
				<li>Create/View project
				<ul>
					<li><a href="<s:url action="loadCreateProject"/>">Create project</a></li>
					<li><a href="<s:url action="showProject"/>">View projects</a></li>
				</ul>
				</li>
				<li>Create/View department
				<ul>
					<li><a href="<s:url action="loadCreateDepartment"/>">Create department</a></li>
					<li><a href="<s:url action="showDepartment"/>">View department</a></li>
				</ul>
				</li>
				<li>Create/View Clients
				<ul>
					<li><a href="<s:url action="loadCreateClient"/>">Create Client</a></li>
					<li><a href="<s:url action="showClient"/>">View Clients</a></li>
				</ul>
				</li>
				</ul>
			</li>
			<% } %>
			<li><a href="<s:url action="logout"/>" >Logout</a></li>

		</ul>
	</div>
</body>
</html>